package vip.web3.common.enums;

import lombok.Getter;

/**
 * 钱包类型 0 待定，1 人民币,  2 USDT
 *
 * @title: AssetsIntoType
 * @description: TODO
 */
@Getter
public enum WalletTypeEnum {
    /**
     * 待定
     */
    UNKNOWN(0, "待定"),

    /**
     * 人民币
     */
    CNY(1, "人民币"),

    /**
     * USDT
     */
    USDT(2, "USDT"),
    ;

    private final Integer code;
    private final String desc;

    WalletTypeEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static WalletTypeEnum get(Integer code) {
        for (WalletTypeEnum value : values()) {
            if (value.code.equals(code)) {
                return value;
            }
        }
        return null;
    }

    public Integer getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }
}
